package week01;


public class T004 {
	public static boolean isHuiWen1(String s) {
		for(int left=0,right=s.length()-1;left<right;++left,--right) {
			if(s.charAt(right)!=s.charAt(left)) return false;
		}
		return true;
	}
	public static boolean isHuiWen2(String s) {
		return s.equals(new StringBuilder(s).reverse().toString());
	}
	public static void main(String[] args) {
		int max=0;
		for(int i=100;i<1000;i++) {
			for(int j=i;j<1000;j++) {
				if(isHuiWen2(String.valueOf(i*j))) {
					max= Math.max(max, i*j);
				}
			}
		}
		System.out.println(max);
	}
}
